gtk4.git
8 years agobindings: Convert to use GdkEvent API
Matthias Clasen [Sat, 26 Aug 2017 02:51:18 +0000 (22:51 -0400)]
bindings: Convert to use GdkEvent API

8 years agoAdd more getters for event fields
Matthias Clasen [Sat, 26 Aug 2017 02:50:52 +0000 (22:50 -0400)]
Add more getters for event fields

8 years agogdk: Make GdkEvent structs/union opaque
Carlos Garnacho [Sat, 5 Aug 2017 13:34:39 +0000 (15:34 +0200)]
gdk: Make GdkEvent structs/union opaque

All users are forced to deal with events as opaque pointers, only
using API to access the info.

8 years agobindings: Partially update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:58:33 +0000 (16:58 +0200)]
bindings: Partially update to using GdkEvent API

8 years agoa11y: Partially update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:58:20 +0000 (16:58 +0200)]
a11y: Partially update to using GdkEvent API

8 years agoinspector: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:57:26 +0000 (16:57 +0200)]
inspector: Update to using GdkEvent API

8 years agogtkwindow: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:56:53 +0000 (16:56 +0200)]
gtkwindow: Update to using GdkEvent API

8 years agotreeview: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:56:15 +0000 (16:56 +0200)]
treeview: Update to using GdkEvent API

8 years agotooltip: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:56:05 +0000 (16:56 +0200)]
tooltip: Update to using GdkEvent API

8 years agotextview: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:55:47 +0000 (16:55 +0200)]
textview: Update to using GdkEvent API

8 years agotexthandle: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:55:39 +0000 (16:55 +0200)]
texthandle: Update to using GdkEvent API

8 years agospinbutton: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:55:22 +0000 (16:55 +0200)]
spinbutton: Update to using GdkEvent API

8 years agoscrolledwindow: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:54:34 +0000 (16:54 +0200)]
scrolledwindow: Update to using GdkEvent API

8 years agoscalebutton: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:54:21 +0000 (16:54 +0200)]
scalebutton: Update to using GdkEvent API

8 years agorecentchoooser: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:54:11 +0000 (16:54 +0200)]
recentchoooser: Update to using GdkEvent API

8 years agorange: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:52:41 +0000 (16:52 +0200)]
range: Update to using GdkEvent API

8 years agopopover: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:52:16 +0000 (16:52 +0200)]
popover: Update to using GdkEvent API

8 years agoplacesview: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:52:03 +0000 (16:52 +0200)]
placesview: Update to using GdkEvent API

8 years agoplacessidebar: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:51:49 +0000 (16:51 +0200)]
placessidebar: Update to using GdkEvent API

8 years agopaned: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:51:12 +0000 (16:51 +0200)]
paned: Update to using GdkEvent API

8 years agonotebook: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:50:30 +0000 (16:50 +0200)]
notebook: Update to using GdkEvent API

8 years agomountoperation: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:50:14 +0000 (16:50 +0200)]
mountoperation: Update to using GdkEvent API

8 years agomenu: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:49:38 +0000 (16:49 +0200)]
menu: Update to using GdkEvent API

To some extent, plenty of root coordinate calculations left...

8 years agolistbox: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:49:12 +0000 (16:49 +0200)]
listbox: Update to using GdkEvent API

8 years agoimcontext: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:48:47 +0000 (16:48 +0200)]
imcontext: Update to using GdkEvent API

8 years agoiconview: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:48:09 +0000 (16:48 +0200)]
iconview: Update to using GdkEvent API

8 years agogesture: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:47:11 +0000 (16:47 +0200)]
gesture: Update to using GdkEvent API

To some extent, pad and touchpad gesture events need extra API.

8 years agofontchooser: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:46:28 +0000 (16:46 +0200)]
fontchooser: Update to using GdkEvent API

8 years agoflowbox: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:46:15 +0000 (16:46 +0200)]
flowbox: Update to using GdkEvent API

8 years agofilechooser: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:46:01 +0000 (16:46 +0200)]
filechooser: Update to using GdkEvent API

8 years agoentrycompletion: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:45:20 +0000 (16:45 +0200)]
entrycompletion: Update to using GdkEvent API

8 years agoentry: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:45:12 +0000 (16:45 +0200)]
entry: Update to using GdkEvent API

8 years agocombobox: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:44:59 +0000 (16:44 +0200)]
combobox: Update to using GdkEvent API

8 years agocolorswatch: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:44:48 +0000 (16:44 +0200)]
colorswatch: Update to using GdkEvent API

8 years agocolorplane: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:44:38 +0000 (16:44 +0200)]
colorplane: Update to using GdkEvent API

8 years agocoloreditor: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:44:29 +0000 (16:44 +0200)]
coloreditor: Update to using GdkEvent API

8 years agocellrendererspin: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:44:04 +0000 (16:44 +0200)]
cellrendererspin: Update to using GdkEvent API

8 years agocellarea: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:43:52 +0000 (16:43 +0200)]
cellarea: Update to using GdkEvent API

8 years agocalendar: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:43:42 +0000 (16:43 +0200)]
calendar: Update to using GdkEvent API

8 years agobutton: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:43:09 +0000 (16:43 +0200)]
button: Update to using GdkEvent API

8 years agoappchooserwidget: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:42:39 +0000 (16:42 +0200)]
appchooserwidget: Update to using GdkEvent API

8 years agoaboutdialog: Update to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:42:09 +0000 (16:42 +0200)]
aboutdialog: Update to using GdkEvent API

8 years agomodules: Update input context impls to using GdkEvent API
Carlos Garnacho [Fri, 25 Aug 2017 14:40:59 +0000 (16:40 +0200)]
modules: Update input context impls to using GdkEvent API

8 years agogdk/wayland: Don't make gtk_shell1 v2 mandatory
Carlos Garnacho [Tue, 19 Sep 2017 16:30:01 +0000 (18:30 +0200)]
gdk/wayland: Don't make gtk_shell1 v2 mandatory

It may result in a protocol error on older mutters, as GTK+ will
invariably request a higher version than what's available. Make
GTK+ also accept v1 if it's all the compositor has got.

8 years agocss: Drop the new indent api again
Matthias Clasen [Tue, 19 Sep 2017 03:18:08 +0000 (23:18 -0400)]
css: Drop the new indent api again

It is not used anymore, and it was not a good idea.

8 years agocss: Use enums instead of idents for font-variant properties
Matthias Clasen [Mon, 18 Sep 2017 22:38:16 +0000 (18:38 -0400)]
css: Use enums instead of idents for font-variant properties

As Benjamin says, ident should only be used if any value
is valid, which is not the case here. So use enums instead,
which should also be more efficient. To handle the more
complicated cases like font-variant-ligatures, we have to
introduce flags-like values.

8 years agowayland: Bump GTK_SHELL1 version to 2
Georges Basile Stavracas Neto [Tue, 19 Sep 2017 02:49:44 +0000 (23:49 -0300)]
wayland: Bump GTK_SHELL1 version to 2

Otherwise, we can't negotiate the latest version with the
compositor, making the compositor use v1 of the protocol and
pretty much ignoring all the edge constraints work.

8 years agoUpdate Polish translation
Piotr Drąg [Tue, 19 Sep 2017 00:11:26 +0000 (02:11 +0200)]
Update Polish translation

8 years agoWindow: Clarify documentation of set_application()
Daniel Boles [Mon, 18 Sep 2017 23:05:09 +0000 (00:05 +0100)]
Window: Clarify documentation of set_application()

Clarify that ::destroy, not ::hide*, removes a window from its app, by
replacing the mention of open windows with the blurb on destruction from
:application, completing commit 7db4bee4b62bc9b6f20ba4e599e8d030314984fd

Also link to the equivalent gtk_application_(add|remove)_window() calls,
since Application.add_window() already links back to Window:application.

* unless you use gtkmm…

https://bugzilla.gnome.org/show_bug.cgi?id=639931

8 years agoPlacesSidebar: Avoid unused mem if !CLOUDPROVIDERS
Daniel Boles [Mon, 18 Sep 2017 23:14:41 +0000 (00:14 +0100)]
PlacesSidebar: Avoid unused mem if !CLOUDPROVIDERS

The member GList *cloud_rows is only ever used if HAVE_CLOUDPROVIDERS is
defined, so don’t declare it if not.

8 years agoPlacesSidebar: Unref cloud_manager in dispose()
Daniel Boles [Tue, 12 Sep 2017 21:15:27 +0000 (22:15 +0100)]
PlacesSidebar: Unref cloud_manager in dispose()

We ref the CloudProviders singleton in init() but did not unref it in
dispose(). Do so, using g_clear_object().

https://bugzilla.gnome.org/show_bug.cgi?id=787600

8 years agoSidebarRow: Unref CloudProvider on change/finalize
Daniel Boles [Tue, 12 Sep 2017 20:56:46 +0000 (21:56 +0100)]
SidebarRow: Unref CloudProvider on change/finalize

It was never unref()d, either when replacing the existing GObject in
set_property(), cleaning up in finalize(), or becoming a placeholder.

Fix by using g_set_object() and g_clear_object() to unref as needed.

This also drops the check that the newly set object is a valid cloud
provider account, as we don’t do the equivalent for any of the other
object-typed properties, and Carlos didn’t think this was important.

https://bugzilla.gnome.org/show_bug.cgi?id=787600

8 years agoFix a typo
Matthias Clasen [Mon, 18 Sep 2017 22:10:08 +0000 (18:10 -0400)]
Fix a typo

The property is called font-variant-alternates, not -alternatives.
Correct this everywhere.

8 years agocss: implement font-variant as a shorthand
Matthias Clasen [Mon, 18 Sep 2017 15:28:05 +0000 (11:28 -0400)]
css: implement font-variant as a shorthand

Drop the current css2-style font-variant property and
replace it with a shorthand as specified in the css3 fonts
module. Currently, we fully support the font-variant-ligatures,
font-variant-position, font-variant-caps, font-variant-numeric
and font-variant-east-asian subproperties. font-variant-alternatives
is only partially supported.

8 years agocss: Implement font-variant-east-asian
Matthias Clasen [Mon, 18 Sep 2017 16:42:42 +0000 (12:42 -0400)]
css: Implement font-variant-east-asian

This is translated to the corresponding OpenType features.

8 years agocss: Implement font-variant-alternatives
Matthias Clasen [Mon, 18 Sep 2017 14:01:05 +0000 (10:01 -0400)]
css: Implement font-variant-alternatives

This is only a partial implementation, since we don't support
@font-feature-values. The only supported value is historical-forms,
for now.

8 years agocss: Implement font-variant-numeric
Matthias Clasen [Mon, 18 Sep 2017 11:34:46 +0000 (07:34 -0400)]
css: Implement font-variant-numeric

This gets translated to the corresponding OpenType features.

8 years agocss: Implement font-variant-caps
Matthias Clasen [Mon, 18 Sep 2017 04:12:12 +0000 (00:12 -0400)]
css: Implement font-variant-caps

This gets translated to the corresponding OpenType features.

8 years agocss: Implement font-variant-position
Matthias Clasen [Mon, 18 Sep 2017 04:01:39 +0000 (00:01 -0400)]
css: Implement font-variant-position

This gets translated to the corresponding OpenType features.

8 years agocss: Implement font-variant-ligatures
Matthias Clasen [Mon, 18 Sep 2017 03:52:04 +0000 (23:52 -0400)]
css: Implement font-variant-ligatures

This gets translated into corresponding OpenType features.

8 years agocss: Implement font-kerning
Matthias Clasen [Mon, 18 Sep 2017 01:27:59 +0000 (21:27 -0400)]
css: Implement font-kerning

This gets translated to the OpenType feature kern.

8 years agoAdd an auxiliary ident parsing function
Matthias Clasen [Mon, 18 Sep 2017 14:55:36 +0000 (10:55 -0400)]
Add an auxiliary ident parsing function

This lets us conveniently create ident values from
multiple candidates.

8 years agobuild: Bump minimum Meson version to 0.42.1
Debarshi Ray [Mon, 18 Sep 2017 16:04:34 +0000 (18:04 +0200)]
build: Bump minimum Meson version to 0.42.1

Otherwise it fails to build with:

  FAILED: gtk/im-ipa@sha/imipa.c.o
  ...
  In file included from ../gtk/gtkintl.h:4:0,
                   from ../modules/input/imipa.c:28:
  /opt/include/glib-2.0/glib/gi18n-lib.h:27:2: error: #error You must
          define GETTEXT_PACKAGE before including gi18n-lib.h. Did you
          forget to include config.h?
   #error You must define GETTEXT_PACKAGE before
           including gi18n-lib.h.  Did you forget to include config.h?
    ^~~~~
  ../modules/input/imipa.c:144:3: error: ‘GETTEXT_PACKAGE’ undeclared
          here (not in a function)
     GETTEXT_PACKAGE,     /* Translation domain */
     ^~~~~~~~~~~~~~~
  ../modules/input/imipa.c:145:4: error: ‘GTK_LOCALEDIR’ undeclared
          here (not in a function)
      GTK_LOCALEDIR,     /* Dir for bindtextdomain (not strictly
              needed for "gtk+") */
      ^~~~~~~~~~~~~

8 years agoUpdate Swedish translation
Anders Jonsson [Mon, 18 Sep 2017 11:22:25 +0000 (11:22 +0000)]
Update Swedish translation

8 years agoUpdate Swedish translation
Anders Jonsson [Mon, 18 Sep 2017 11:20:48 +0000 (11:20 +0000)]
Update Swedish translation

8 years agowindow: Improve detection of edge constraint support
Georges Basile Stavracas Neto [Mon, 18 Sep 2017 02:09:10 +0000 (23:09 -0300)]
window: Improve detection of edge constraint support

Instead of relying on special values of edge constraints, this
patch adds an internal-only gdk_window_supports_edge_constraints()
function that by default returns FALSE, and is implemented by
GdkWindowWayland and GdkWindowX11.

This way, we can properly detect server-side support for this
feature and adapt accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=783669

8 years agowindow: Add individual CSS classes based on edge constraints
Georges Basile Stavracas Neto [Fri, 18 Aug 2017 23:12:23 +0000 (20:12 -0300)]
window: Add individual CSS classes based on edge constraints

The last touch on this patch series is making GtkWindow able to
selectively adjust various UI details based on the different
tiled edges. The main driver here is that we don't want to show
shadows on edges that are constrained.

This patch adds the necessary code to do that, while still
maintaining compatibility with the old ways.

https://bugzilla.gnome.org/show_bug.cgi?id=783669

8 years agox11: Add support for _GTK_EDGE_CONSTRAINTS atom
Georges Basile Stavracas Neto [Fri, 18 Aug 2017 23:09:15 +0000 (20:09 -0300)]
x11: Add support for _GTK_EDGE_CONSTRAINTS atom

Following the previous patch, where edge constraints support
was added to the Wayland backend, this patch introduces the
necessary code to handle the _GTK_EDGE_CONSTRAINTS atom from
X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=783669

8 years agowayland: consider edge constraints in surface configuration
Georges Basile Stavracas Neto [Thu, 17 Aug 2017 03:35:52 +0000 (00:35 -0300)]
wayland: consider edge constraints in surface configuration

Now that GTK windows have the ability to properly handle
per-edge tiling constraints, this patch extends GTK's
internal Wayland protocol to have a proper enum with the
relevant edge data.

Once this approach is validated, we can think of upstreaming
this work as an official Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669

8 years agowindow: handle tiled edges separately
Georges Basile Stavracas Neto [Thu, 17 Aug 2017 03:30:31 +0000 (00:30 -0300)]
window: handle tiled edges separately

GTK windows don't have their tiling states really
hooked into the client-side decoration code, and
the only effect it has is disabling the resizing
edges.

With the introduction of per-edge tiling information,
we are backed by much more precise data on how the
window manager wants the app to behave.

This patch, then, fixes GtkWindow to take into account
per-edge tiling information. For compatibility purposes,
the previous tiled field was kept, and thing will just
continue working if no edge information is supplied.

https://bugzilla.gnome.org/show_bug.cgi?id=783669

8 years agogdk: introduce edge constraint states
Georges Basile Stavracas Neto [Thu, 17 Aug 2017 03:23:07 +0000 (00:23 -0300)]
gdk: introduce edge constraint states

These states will be consumed by GtkWindow in order to
have better edge management on tiling situations. Their
values are supplied by the compositor, and will be send
through and X11 Atom or a Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669

8 years agoFix the -gtk-outline-radius shorthand
Matthias Clasen [Mon, 18 Sep 2017 01:17:30 +0000 (21:17 -0400)]
Fix the -gtk-outline-radius shorthand

It needs to refer to the -gtk-prefixed subproperties now.

8 years agoDrop support for deprecated pseudo-classes
Matthias Clasen [Sun, 17 Sep 2017 21:04:16 +0000 (17:04 -0400)]
Drop support for deprecated pseudo-classes

We no longer have any of those.

8 years agoDrop code parsing deprecated forms of url
Matthias Clasen [Sun, 17 Sep 2017 21:01:29 +0000 (17:01 -0400)]
Drop code parsing deprecated forms of url

We no longer allow whitespace between url and (.

8 years agoDrop code handling deprecated style properties
Matthias Clasen [Sun, 17 Sep 2017 20:59:26 +0000 (16:59 -0400)]
Drop code handling deprecated style properties

We no longer have any deprecated style properties.

8 years agoDrop the aliasing api for style properties
Matthias Clasen [Sun, 17 Sep 2017 20:56:55 +0000 (16:56 -0400)]
Drop the aliasing api for style properties

This was added to deprecate style properties. All deprecated
style properties are gone now, so this is no longer needed.

8 years agoDrop the gtk-key-bindings property
Matthias Clasen [Sun, 17 Sep 2017 20:51:52 +0000 (16:51 -0400)]
Drop the gtk-key-bindings property

This has been deprecated for a while. Just use the -gtk-prefixed
name.

8 years agoDrop the icon-shadow property name
Matthias Clasen [Sun, 17 Sep 2017 20:51:05 +0000 (16:51 -0400)]
Drop the icon-shadow property name

This has been deprecated for a while. Just use the -gtk-prefixed
name.

8 years agoDrop aliases for outline radius
Matthias Clasen [Sun, 17 Sep 2017 20:49:33 +0000 (16:49 -0400)]
Drop aliases for outline radius

The outline-{top,bottom}-{left,right}-radius names have been
deprecated for a while, so lets remove them. Everybody should
just use the -gtk-prefixed names for these properties.

8 years agoDrop support for one-stop gradients
Matthias Clasen [Sun, 17 Sep 2017 20:40:45 +0000 (16:40 -0400)]
Drop support for one-stop gradients

These have been deprecated for a while. Time to make this an
error for GTK+ 4.

8 years agoDrop support for pango syntax in css
Matthias Clasen [Sun, 17 Sep 2017 20:37:26 +0000 (16:37 -0400)]
Drop support for pango syntax in css

This has been deprecated for a while, so it should go away
for GTK+ 4.

8 years agoAdwaita: Fix color of focus outline on colorswatch
Daniel Boles [Sat, 16 Sep 2017 16:02:24 +0000 (17:02 +0100)]
Adwaita: Fix color of focus outline on colorswatch

The focus outline disappeared as the colour of the swatch got close to
the normal focus outline colour, which is alpha(currentColor, 0.3).

Fix by making the outline an alpha’d version of the tick colour, but
more opaque than normal outlines. 0.6 seems good enough; feel free to
improve it, but at least this ensures the outline can’t vanish anymore.

HighContrast achieves this already because it applies the color property
to the main node, not the overlay. Doing that means the outline is fully
opaque, which is fine for HC obviously but was excessive for Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=787757

8 years agoAdwaita: dark: Make colorswatch.light tick visible
Daniel Boles [Sat, 16 Sep 2017 14:46:50 +0000 (15:46 +0100)]
Adwaita: dark: Make colorswatch.light tick visible

It used $text_color unconditionally, but in :dark, text is white, so we
overlaid a white tick on any light colours, all the way to white itself.

Using these named colours doesn’t make practical or semantic sense.
Instead, use white/black over dark/light swatches, as in HC, so all
variant–swatch combos work. Light looks the same, & :dark works now.

For backdrop, use alpha 0.5, unlike 0.7 in HC, as that seemed excessive
& different from the current effect. 0.5 is almost identical to how
$backdrop_fg_colour is a 50% mix of $fg_color, & matches backdrop text.

https://bugzilla.gnome.org/show_bug.cgi?id=787531

8 years agotests: Update testoverlay "Chase" testcase to gtk4 crossing events
Carlos Garnacho [Mon, 11 Sep 2017 14:59:58 +0000 (16:59 +0200)]
tests: Update testoverlay "Chase" testcase to gtk4 crossing events

The intent is detecting enter events into the overlayed label, so just
connect to ::enter-notify-event on the label with no GdkWindow checks.

8 years agoExpander: get_label() return is nullable
Daniel Boles [Fri, 15 Sep 2017 17:24:24 +0000 (18:24 +0100)]
Expander: get_label() return is nullable

Also, use gchar to match the header.

8 years agobuild: Declare cairo_libs outside MSVC check block
Emmanuele Bassi [Fri, 15 Sep 2017 14:57:34 +0000 (15:57 +0100)]
build: Declare cairo_libs outside MSVC check block

Otherwise there won't be a reference to it on non-MSVC builds.

8 years agobuild: Add fallback dependency discovery for MSVC
Chun-wei Fan [Tue, 12 Sep 2017 05:34:36 +0000 (13:34 +0800)]
build: Add fallback dependency discovery for MSVC

For dependencies that do not generate pkg-config files for their Visual
Studio build systems, we need to look for them using cc.has_header() and
cc.find_library(), namely for Cairo and HarfBuzz, if one does not have
crafted pkg-config files for them (which, by themselves may be
error-prone).

As a result, we will still try to look for Cairo and HarfBuzz using
pkg-config, but will give another shot at them on Visual Studio using
cc.has_header() and cc.find_library() if they couldn't be found via
pkg-config.

https://bugzilla.gnome.org/show_bug.cgi?id=785210

8 years agobuild: Correct PangoCairo required version
Chun-wei Fan [Tue, 12 Sep 2017 05:31:28 +0000 (13:31 +0800)]
build: Correct PangoCairo required version

We ought to use pango_req instead of cairo_req for the version required
for PangoCairo.

https://bugzilla.gnome.org/show_bug.cgi?id=785210

8 years agomeson.build: Fix Vulkan library detection on Visual Studio
Chun-wei Fan [Fri, 11 Aug 2017 09:05:55 +0000 (17:05 +0800)]
meson.build: Fix Vulkan library detection on Visual Studio

The Vulkan .lib file that is supplied by the LunarG Vulkan SDK is
vulkan-1.lib, not vulkan.lib, so make sure we look for the right
libraries when building on Visual Studio (I am not sure whether the
LunarG SDK will work for MinGW/mingw-w64 builds, as only Visual Studio
.lib files are provided).

Note that this will require one to set LIB and INCLUDE appropriately to
find the Vulkan .lib and header files, and possibly PATH if one's video
drivers do not contain the Vulkan runtime DLL.

https://bugzilla.gnome.org/show_bug.cgi?id=785210

8 years agotestsuite: Fix builder test on Windows/MSVC
Chun-wei Fan [Tue, 1 Aug 2017 08:57:11 +0000 (16:57 +0800)]
testsuite: Fix builder test on Windows/MSVC

Visual Studio does not support things like -Wl,export-dynamic, so we
need to export those symbols by using __declspec(dllexport).  So, we
decorate these with macros which we define accordingly for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=785210

8 years agogtk/gentypefuncs.py: Open files in utf-8 encoding
Chun-wei Fan [Tue, 1 Aug 2017 08:44:20 +0000 (16:44 +0800)]
gtk/gentypefuncs.py: Open files in utf-8 encoding

On Python-3.x, we need to set the encoding when opening files, when this
script is run, as it might contain items that are not supported by the
system's locale (for example, non-English Windows).  So, we use a
wrapper to set the encoding on Python 3.x, but open the file as we did
when using Python 2.x, since file encodings are not supported there.

https://bugzilla.gnome.org/show_bug.cgi?id=785210

8 years agogdk/gdkconfig.h.meson: Add GDK_WINDOWING_WIN32
Chun-wei Fan [Tue, 1 Aug 2017 08:37:43 +0000 (16:37 +0800)]
gdk/gdkconfig.h.meson: Add GDK_WINDOWING_WIN32

This is so that Meson can add this define once it is determined that we
are building for Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=785210

8 years agoExpander: Annotate new()’s label arg as nullable
Daniel Boles [Thu, 14 Sep 2017 20:19:33 +0000 (21:19 +0100)]
Expander: Annotate new()’s label arg as nullable

to match new_with_mnemonic()

8 years agoExpander: Replace (allow-none) with (nullable)
Daniel Boles [Thu, 14 Sep 2017 20:19:12 +0000 (21:19 +0100)]
Expander: Replace (allow-none) with (nullable)

The former is deprecated in favour of the latter.

8 years agoExpander: Explain how to conditionally style arrow
Daniel Boles [Thu, 14 Sep 2017 20:11:50 +0000 (21:11 +0100)]
Expander: Explain how to conditionally style arrow

8 years agoSpinner: Document how to select on animated in CSS
Daniel Boles [Thu, 14 Sep 2017 18:22:31 +0000 (19:22 +0100)]
Spinner: Document how to select on animated in CSS

This is not particularly obvious, so it seems worth including.

8 years agogtk-demo/theming: Don’t mislead about raised class
Daniel Boles [Wed, 13 Sep 2017 13:47:40 +0000 (14:47 +0100)]
gtk-demo/theming: Don’t mislead about raised class

This class is not added by any widgets nor themed by Adwaita/HC.
However, it is presented here as if it does something. It doesn’t.

But we changed the 2 buttons with the .raised class to use symbolic
icons, unlike their ‘unraised’ counterparts, which is unnecessarily
confusing and might make people think .raised affects icons somehow.

So, make them use the same icons in all cases; that way, if .raised is
ever made to do anything, 6 years later, what it does will be clear.

https://bugzilla.gnome.org/show_bug.cgi?id=644248

8 years agowidget-factory: Usefully demo Frame shadow types
Daniel Boles [Thu, 14 Sep 2017 17:34:21 +0000 (18:34 +0100)]
widget-factory: Usefully demo Frame shadow types

Instead of showing the 4 types except for GTK_SHADOW_NONE, which are all
treated identically and provide no way for themes to differentiate, just
keep 2 Frames, and make one of them GTK_SHADOW_NONE to demo a flat Frame

8 years agoFrame: Add missing fixed-width format to enums
Daniel Boles [Wed, 13 Sep 2017 13:36:46 +0000 (14:36 +0100)]
Frame: Add missing fixed-width format to enums

8 years agobuild: Add directories to the summary
Timm Bäder [Thu, 14 Sep 2017 14:04:50 +0000 (16:04 +0200)]
build: Add directories to the summary